package com.ayf.payment.game.api.channel;

import com.ayf.payment.game.api.channel.ehb.handler.EhbPayHandler;
import com.ayf.payment.game.api.channel.faka.FaKaPayHander;
import com.ayf.payment.game.api.channel.huandong.HuanDongPayHander;
import com.ayf.payment.game.api.channel.huyu.HuYuPayHander;
import com.ayf.payment.game.api.channel.longbao.LongBaoPayHandler;
import com.ayf.payment.game.api.channel.qcjh.QCJHPayHander;
import com.ayf.payment.game.api.channel.qiyi.QiYiPayHander;
import com.ayf.payment.game.api.channel.sky98.Sky98PayHander;
import com.ayf.payment.game.api.channel.wanw.WANWPayHander;
import com.ayf.payment.game.api.channel.wanxiang.WanXPayHandler;
import com.ayf.payment.game.api.channel.xingyou.XingYouPayHandler;
import com.ayf.payment.game.api.channel.youka.YouKaPayHandler;
import com.ayf.payment.game.api.channel.zhuofutong.ZhuoFuTongPayHandler;
import com.ayf.payment.game.api.type.PayChannelCodeEnum;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @author wwl
 * @description:
 * @date 2020/4/14 21:30
 */
@Component
public class ChannelHandleFactory {

	@Autowired
	private EhbPayHandler ehbPayHandler;

	@Autowired
	private WanXPayHandler wanXPayHandler;

	@Autowired
	private YouKaPayHandler youKaPayHandler;

	@Autowired
	private LongBaoPayHandler longBaoPayHandler;

	@Autowired
	private ZhuoFuTongPayHandler zhuoFuTongPayHandler;

	@Autowired
	private QiYiPayHander qiYiPayHander;

	@Autowired
	private WANWPayHander wanwPayHander;

	@Autowired
	private XingYouPayHandler xingYouPayHandler;

	@Autowired
	private HuanDongPayHander huanDongPayHander;

	@Autowired
	private QCJHPayHander qcjhPayHander;

	@Autowired
	private HuYuPayHander huYuPayHander;

	@Autowired
	private FaKaPayHander faKaPayHander;

	@Autowired
	private Sky98PayHander sky98PayHander;

	public BaseHandler getHandler(String c) {
		if (c.equals(PayChannelCodeEnum.EHB_PAY.getCode())) {
			return ehbPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.WAN_X_PAY.getCode())) {
			return wanXPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.YOU_KA_PAY.getCode())) {
			return youKaPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.LONG_BAO_PAY.getCode())) {
			return longBaoPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.ZFT_PAY.getCode())) {
			return zhuoFuTongPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.QIYI_PAY.getCode())) {
			return qiYiPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.WANW_PAY.getCode())) {
			return wanwPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.XING_YOU_PAY.getCode())) {
			return xingYouPayHandler;
		}
		else if (c.equals(PayChannelCodeEnum.HuanDong_PAY.getCode())) {
			return huanDongPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.QCJH_PAY.getCode())) {
			return qcjhPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.HuYu_PAY.getCode())) {
			return huYuPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.FaKa_PAY.getCode())) {
			return faKaPayHander;
		}
		else if (c.equals(PayChannelCodeEnum.SKY98_PAY.getCode())) {
			return sky98PayHander;
		}
		return null;
	}

}
